<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>RemoteCopy Task</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
</head>

<body>

<h2><a name="copy">RCopy</a></h2>
<h3>Description</h3>
<p>RCopy is a wrapper of RemoteCopy task. It can hold the large file (up to 2GBytes)</p>

<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td width="72" valign="top"><b>Attribute</b></td>
    <td width="417" valign="top"><b>Description</b></td>
    <td width="257" align="center" valign="top"><b>Required</b></td>
  </tr>
  <tr>
    <td valign="top">filename</td>
    <td valign="top">The file to copy.</td>
    <td valign="top" align="center">YES</td>
  </tr>
  <tr>
    <td valign="top">srcdir</td>
    <td valign="top">the directory on the localhost </td>
    <td valign="top" align="center">YES</td>
  </tr>
  <tr>
    <td valign="top">destdir</td>
    <td valign="top">The directory to copy to.</td>
    <td valign="top" align="center">YES</td>
  </tr>
  <tr>
    <td valign="top">rename</td>
    <td valign="top">the new name for the file </td>
    <td valign="top" align="center">NO</td>
  </tr>
  <tr>
    <td valign="top">hostref</td>
    <td valign="top">reference a remote host.if hostref or hostsetref both not specified, the command will execute locally </td>
    <td valign="top" align="center">NO</td>
  </tr>
  <tr>
    <td valign="top">hostsetref</td>
    <td valign="top">reference remote hosts. if hostref or hostsetref both not specified, the command will execute locally </td>
    <td valign="top" align="center">NO</td>
  </tr>
  <tr>
    <td valign="top">threshold</td>
    <td valign="top">an integer value specified the number of bytes will be transfered once a time, the default value is 20 </td>
    <td align="center" valign="top">NO</td>
  </tr>
  <tr>
    <td valign="top">thresholdunit</td>
    <td valign="top"><p>the unit of bytes, possible values are: <br>
      &quot;b&quot; or &quot;B&quot; for bytes<br>
      &quot;k&quot; or &quot;K&quot; for KBytes<br>
      &quot;m&quot; or &quot;M&quot; for 
      MBytes<br>
      &quot;g&quot; or &quot;G&quot; for GBytes
      <br>
      Default value is &quot;m&quot;</p>    </td>
    <td align="center" valign="top">NO</td>
  </tr>
  <tr>
    <td valign="top">transmit</td>
    <td valign="top">whether or not transmit the command to the remote host, default value is YES, if set to NO, just print the command in standard output. </td>
    <td align="center" valign="top">NO</td>
  </tr>
</table>
<h3>Examples</h3>

<pre>    &lt;remotecopy srcdir=&quot;${resouces.dir}&quot; <br>		destdir=&quot;${resouces.dir}/tmp&quot; <br>		filename=&quot;rcopy&quot; <br>		hostref=&quot;greatwall&quot;/&gt;</pre>
<p>Copy the file ${resouces.dir}/rcopy on localhost to the ${resouces.dir}/tmp on <strong>greatwall</strong>. </p>
<p><strong>Unix Note:</strong> File permissions are not retained when files
  are copied; they end up with the default <code>UMASK</code> permissions
  instead. This
  is caused by the lack of any means to query or set file permissions in the
  current Java runtimes. If you need a permission-preserving copy function,
  use <code>&lt;exec executable="cp" ... &gt;</code> instead.</p>
<p><strong>Windows Note:</strong> If you copy a file to a directory
where that file already exists, but with different casing,
the copied file takes on the case of the original. The workaround is to
<a href="delete.html">delete</a>
the file in the destination directory before you copy it.
</p>

<hr><p align="center">Copyright &copy; 2005 Dant Organization. All rights Reserved.</p>

</body>
</html>

